home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / thinkref / archive / THINKC7.0.4Update.sea.hqx / EDS 7.0.4 Update / AppleScript.h next >
Text File  |  1994-06-01  |  6KB  |  266 lines

  1. /*
  2.     File:        AppleScript.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __APPLESCRIPT__
  13. #define __APPLESCRIPT__
  14.  
  15. #ifndef __OSA__
  16. #include <OSA.h>
  17. /*    #include <AppleEvents.h>                                    */
  18. /*        #include <Types.h>                                        */
  19. /*            #include <ConditionalMacros.h>                        */
  20. /*            #include <MixedMode.h>                                */
  21. /*                #include <Traps.h>                                */
  22. /*        #include <Memory.h>                                        */
  23. /*        #include <OSUtils.h>                                    */
  24. /*        #include <Events.h>                                        */
  25. /*            #include <Quickdraw.h>                                */
  26. /*                #include <QuickdrawText.h>                        */
  27. /*                    #include <IntlResources.h>                    */
  28. /*        #include <EPPC.h>                                        */
  29. /*            #include <PPCToolBox.h>                                */
  30. /*                #include <AppleTalk.h>                            */
  31. /*            #include <Processes.h>                                */
  32. /*                #include <Files.h>                                */
  33. /*                    #include <SegLoad.h>                        */
  34. /*        #include <Notification.h>                                */
  35. /*    #include <AEObjects.h>                                        */
  36. /*    #include <Components.h>                                        */
  37. #endif
  38.  
  39. #ifndef __TEXTEDIT__
  40. #include <TextEdit.h>
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. enum  {
  48.     typeAppleScript                = 'ascr',
  49.     kAppleScriptSubtype            = typeAppleScript,
  50.     typeASStorage                = typeAppleScript
  51. };
  52.  
  53.  
  54. ////////////////////////////////////////////////////////////////////////////////
  55.  
  56.  
  57. // Script Error Codes
  58.  
  59.  
  60. ////////////////////////////////////////////////////////////////////////////////
  61.  
  62.  
  63. // Runtime errors:
  64.  
  65. enum  {
  66.     errASCantConsiderAndIgnore    = -2720,
  67.     errASCantCompareMoreThan32k    = -2721,
  68. // Parser/Compiler errors:
  69.     errASTerminologyNestingTooDeep = -2760,
  70.     errASIllegalFormalParameter    = -2761,
  71.     errASParameterNotForEvent    = -2762,
  72.     errASNoResultReturned        = -2763,
  73. /*     Dialect specific script errors:
  74.      The range -2780 thru -2799 is reserved for dialect specific error codes.
  75.      (Error codes from different dialects may overlap.)
  76.  
  77.     English errors:
  78.  */
  79.     errASInconsistentNames        = -2780
  80. };
  81.  
  82.  
  83. ////////////////////////////////////////////////////////////////////////////////
  84.  
  85.  
  86. // Component Selectors
  87.  
  88.  
  89. ////////////////////////////////////////////////////////////////////////////////
  90.  
  91. #define kASSelectInit 0x1001
  92.  
  93. #define kASSelectSetSourceStyles 0x1002
  94.  
  95. #define kASSelectGetSourceStyles 0x1003
  96.  
  97. #define kASSelectGetSourceStyleNames 0x1004
  98.  
  99. enum  {
  100.     kASHasOpenHandler            = 'hsod'
  101. };
  102.  
  103.  
  104. // This selector is used to query a context as to whether it contains
  105.  
  106.  
  107. // a handler for the kAEOpenDocuments event. This allows "applets" to be 
  108.  
  109.  
  110. // distinguished from "droplets."  OSAGetScriptInfo returns false if
  111.  
  112.  
  113. // there is no kAEOpenDocuments handler, and returns the error value 
  114.  
  115.  
  116. // errOSAInvalidAccess if the input is not a context.
  117.  
  118.  
  119. ////////////////////////////////////////////////////////////////////////////////
  120.  
  121.  
  122. // Initialization
  123.  
  124.  
  125. ////////////////////////////////////////////////////////////////////////////////
  126.  
  127. extern pascal OSAError ASInit(ComponentInstance scriptingComponent, long modeFlags, long minStackSize, long preferredStackSize, long maxStackSize, long minHeapSize, long preferredHeapSize, long maxHeapSize)
  128.  FIVEWORDINLINE(0x2F3C, 28, 0x1001, 0x7000, 0xA82A);
  129.  
  130. // This call can be used to explicitly initialize AppleScript.  If it is
  131.  
  132.  
  133. // not called, the a scripting size resource is looked for and used. If
  134.  
  135.  
  136. // there is no scripting size resource, then the constants listed below
  137.  
  138.  
  139. // are used.  If at any stage (the init call, the size resource, the 
  140.  
  141.  
  142. // defaults) any of these parameters are zero, then parameters from the
  143.  
  144.  
  145. // next stage are used.  ModeFlags are not currently used.
  146.  
  147.  
  148. // Errors:
  149.  
  150.  
  151. //    errOSASystemError        initialization failed
  152.  
  153.  
  154. // These values will be used if ASInit is not called explicitly, or if any
  155.  
  156.  
  157. // of ASInit's parameters are zero:
  158.  
  159. #ifdef THINK_C
  160. enum  {
  161.     kASDefaultMinStackSize        = (4 * 1024),
  162.     kASDefaultPreferredStackSize = (16 * 1024),
  163.     kASDefaultMaxStackSize        = (16 * 1024),
  164.     kASDefaultMinHeapSize        = (4 * 1024),
  165.     kASDefaultPreferredHeapSize    = (16 * 1024),
  166.     kASDefaultMaxHeapSize        = (32L * 1024 * 1024)
  167. };
  168. #else
  169. enum  {
  170.     kASDefaultMinStackSize        = (4 * 1024),
  171.     kASDefaultPreferredStackSize = (16 * 1024),
  172.     kASDefaultMaxStackSize        = (16 * 1024),
  173.     kASDefaultMinHeapSize        = (4 * 1024),
  174.     kASDefaultPreferredHeapSize    = (16 * 1024),
  175.     kASDefaultMaxHeapSize        = (32 * 1024 * 1024)
  176. };
  177. #endif
  178.  
  179. ////////////////////////////////////////////////////////////////////////////////
  180.  
  181.  
  182. // Source Styles
  183.  
  184.  
  185. ////////////////////////////////////////////////////////////////////////////////
  186.  
  187. extern pascal OSAError ASSetSourceStyles(ComponentInstance scriptingComponent, STHandle sourceStyles)
  188.  FIVEWORDINLINE(0x2F3C, 4, 0x1002, 0x7000, 0xA82A);
  189.  
  190. // Errors:
  191.  
  192.  
  193. //    errOSASystemError        operation failed
  194.  
  195. extern pascal OSAError ASGetSourceStyles(ComponentInstance scriptingComponent, STHandle *resultingSourceStyles)
  196.  FIVEWORDINLINE(0x2F3C, 4, 0x1003, 0x7000, 0xA82A);
  197.  
  198. // Errors:
  199.  
  200.  
  201. //    errOSASystemError        operation failed
  202.  
  203. extern pascal OSAError ASGetSourceStyleNames(ComponentInstance scriptingComponent, long modeFlags, AEDescList *resultingSourceStyleNamesList)
  204.  FIVEWORDINLINE(0x2F3C, 8, 0x1004, 0x7000, 0xA82A);
  205.  
  206. // This call returns an AEList of styled text descriptors the names of the
  207.  
  208.  
  209. // source styles in the current dialect.  The order of the names corresponds
  210.  
  211.  
  212. // to the order of the source style constants, below.  The style of each
  213.  
  214.  
  215. // name is the same as the styles returned by ASGetSourceStyles.
  216.  
  217.  
  218. // 
  219.  
  220.  
  221. // Errors:
  222.  
  223.  
  224. //    errOSASystemError        operation failed
  225.  
  226.  
  227. // Elements of STHandle correspond to following categories of tokens, and
  228.  
  229.  
  230. // accessed through following index constants:
  231.  
  232. enum  {
  233.     kASSourceStyleUncompiledText = 0,
  234.     kASSourceStyleNormalText    = 1,
  235.     kASSourceStyleLanguageKeyword = 2,
  236.     kASSourceStyleApplicationKeyword = 3,
  237.     kASSourceStyleComment        = 4,
  238.     kASSourceStyleLiteral        = 5,
  239.     kASSourceStyleUserSymbol    = 6,
  240.     kASSourceStyleObjectSpecifier = 7,
  241.     kASNumberOfSourceStyles        = 8
  242. };
  243.  
  244.  
  245. // Gestalt selectors for AppleScript
  246.  
  247. enum  {
  248.     gestaltAppleScriptAttr        = 'ascr',
  249.     gestaltAppleScriptVersion    = 'ascv'
  250. };
  251.  
  252. enum  {
  253.     gestaltAppleScriptPresent    = 0,
  254.     gestaltAppleScriptPowerPCSupport = 1
  255. };
  256.  
  257.  
  258. ////////////////////////////////////////////////////////////////////////////////
  259.  
  260. #ifdef __cplusplus
  261. }
  262. #endif
  263.  
  264. #endif
  265.  
  266.